

package com.scs.application.modules.base.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.model.DataEntity;
import com.scs.application.core.utils.excel.annotation.ExcelAutoColumnSize;
import com.scs.application.core.utils.excel.annotation.ExcelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

/**
 * 商品实体对象
 *
 */
@TableName("hospital_supplier")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Accessors(chain = true)
@ExcelAutoColumnSize
public class ExcelHospitalSupplierDTO extends DataEntity implements IExcelDataModel, IExcelModel, Serializable {

    /**
     * 医院ID
     */
    @Length(min = 1, max = 20, message = "医院ID长度必须介于 1 和 20 之间")
    private String hospitalId;

    /**
     * 医院名称
     */
    @ExcelComment(notNull = true, example = "医院测试")
    @Excel(name = "医院名称")
    private String hospitalName;

    private String supplierId;

    @ExcelComment(notNull = true, example = "供应商测试")
    @Excel(name = "供应商名称")
//    @NotNull(message = "供应商名称不能为空")
    private String supplierName;

    /**
     * 供应商账号
     */
    //@ExcelComment(notNull = true, example = "S000001")
    //@Excel(name = "供应商账号")
    @TableField(exist = false)
    private String loginKey;

    @ExcelComment(notNull = true, dict = "common_inactive", example = "1")
    @Excel(name = "正常/停用", dict = "common_inactive")
    private Integer inactive;

    private Integer rowNum;
    private String errorMsg;

    @Override
    public Integer getRowNum() {
        return rowNum;
    }

    @Override
    public void setRowNum(Integer rowNum) {
        this.rowNum = rowNum;
    }

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }

    @Override
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
